package com.mobile.util.dozer;

import org.dozer.CustomFieldMapper;
import org.dozer.classmap.ClassMap;
import org.dozer.fieldmap.FieldMap;
import org.hibernate.Hibernate;


public class CustomDozerFieldMapper implements CustomFieldMapper {

	@Override
	public boolean mapField(Object source, Object destination, Object sourceFieldValue, ClassMap classMap, FieldMap fieldMapping){       
		if (!Hibernate.isInitialized(sourceFieldValue)){
			destination = null;
			return true;
		}
		return false;
    }   

}
